<?php
$this->breadcrumbs=array(
	'Client'=>array('/client'),
	'Applicants',
);

/*
$this->menu=array(
	array('label'=>'Back to your profile', 'url'=>array('/employee/view' ,'id'=>Yii::app()->user->id)),
	array('label'=>'Payroll Ledger', 'url'=>array('/employee/payledger', 'id'=>Yii::app()->user->id)), 
	array('label'=>'Claim Ledger', 'url'=>array('/employee/particulars', 'id'=>Yii::app()->user->id)),
	array('label'=>'Rank History', 'url'=>array('/employee/rankhistory', 'id'=>Yii::app()->user->id)),
	array('label'=>'Unit History', 'url'=>array('/employee/unithistory', 'id'=>Yii::app()->user->id)),
);
*/

?>

<?php $cid= $model->user_id;?>

<h1>Applicants</h1>

<?php $applicants=Client::model()->findAll('cid = :a', array(':a'=>$model->id));?>
<?php if (count($applicants) !== 0){?>
<br>
<table>
	<thead> <tr><th>Last Name</th> </tr> </thead>
<?php foreach ($applicants as $row) { ?>

		<tr>
		<td><?php echo $row->number; ?></td>
		<td><?php echo $row->particular->description; ?></td>
		<td><?php echo $row->status; ?></td>
		<td><?php echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($row->period_from, 'long', false)).' to '.CHtml::encode(Yii::app()->dateFormatter->formatDateTime($row->period_to, 'long', false)); ?></td>
		<td><?php echo $row->department->description; ?></td>
		<td><?php echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($row->date_modified, 'long', false)); ?></td>
		<td><?php echo $row->amount; ?></td>
		</tr>
<?php }} ?>
</table>

